<div ng-controller="tableTypeCtrl">
    <div class="bg-light lter b-b wrapper-md ng-scope">
        <h4 class="m-n font-thin">桌号管理</h4>
        <button onClick="javascript:history.go(-1)" class="btn-back btn btn-dark btn-sm btn-rounded">
            返回
        </button>
    </div>
    <div class="wrapper-md">
        <div class="panel-body panel-default panel">
            <div class="b-a">
                <div class="panel-body panel m-n b-b">
                    <a class="b-a b-success btn btn-sm text-success h6 m-r-sm" ng-click="openAddPoup()">添加桌号类型</a>
                    <span class="text-muted h6">主要用于桌号服务类型区分(如:包间)</span>
                </div>
                <div class="bg-white">
                    <div>
                        <table class="table table-striped bg-white h6 m-n">
                            <thead>
                                <tr>
                                    <th>类型名字</th>
                                    <th>首收(元)</th>
                                    <th>续人(个)</th>
                                    <th>续收(元)</th>
                                    <th>最小人数</th>
                                    <th>最大人数</th>
                                    <th>开始时间</th>
                                    <th>结束时间</th>
                                    <th>有效时间(单位:分)</th>
                                    <th width="150">操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr ng-repeat="item in list">
                                    <td>{{item.name}}</td>
                                    <td>{{item.basicMoney | number:2}}</td>
                                    <td>{{item.incrementPeople}}</td>
                                    <td>{{item.incrementMoney | number:2}}</td>
                                    <td>{{item.minNumber}}</td>
                                    <td>{{item.maxNumber}}</td>
                                    <td>{{item.startTime}}</td>
                                    <td>{{item.endTime}}</td>
                                    <td>{{item.validTime/60}}</td>
                                    <td>
                                        <button class="btn btn-info btn-sm" ng-click="openEditPoup(item.id)">修改</button>
                                        <button class="btn btn-danger btn-sm" ng-click="delete(item.id,item.name)">删除</button>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div ng-if="list.length<=0 && !app.loading" class="padder-v text-center">
                        <span class="h6">~未搜索到任何数据~</span>
                    </div>
                    <div>
                        <circle-loading ng-if="app.loading"></circle-loading>
                    </div>
                </div>
                <footer class="panel-footer">
                    <div class="row">
                        <div class="col-sm-offset-4 col-sm-4 text-center">
                            <small class="text-muted inline m-t-sm m-b-sm">显示第 {{startRow}} 至 {{endRow}} 项结果，共 {{totalItems}} 项</small>
                        </div>
                        <div class="col-sm-4 text-right text-center-xs">
                            <pagination boundary-links="true" total-items="totalItems" ng-model="currentPage"
                                        ng-change="pageChanged()" max-size="{{maxPageRow}}" class="pagination-sm m-t-none m-b"
                                        previous-text="上一页" next-text="下一页"
                                        first-text="首页" last-text="尾页"></pagination>
                        </div>
                    </div>
                </footer>
            </div>
        </div>
    </div>
</div>
